Dynomotion

Group: DynoMotion Message: 2183 From: himykabibble Date: 11/11/2011
Subject: Step Pulleys and Spindle Speed
I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?

Regards,
Ray L.
Group: DynoMotion Message: 2185 From: Tom Kerekes Date: 11/11/2011
Subject: Re: Step Pulleys and Spindle Speed
Hi Ray,
 
Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
 
(CMD,SetPersistDec99 3)
 
Regards
TK


Group: DynoMotion Message: 2188 From: himykabibble Date: 11/11/2011
Subject: Re: Step Pulleys and Spindle Speed
Tom,

So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
>  
> Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
>  
> (CMD,SetPersistDec99 3)
>  
> Regards
> TK
>
>
>
> ________________________________
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 11, 2011 6:46 AM
> Subject: [DynoMotion] Step Pulleys and Spindle Speed
>
>
>  
> I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
>
> Regards,
> Ray L.
>
Group: DynoMotion Message: 2189 From: Tom Kerekes Date: 11/11/2011
Subject: Re: Step Pulleys and Spindle Speed
Hi Ray,
 
Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
 
In this case you actually don't need any M code program at all.  Normally KMotionCNC itself puts the MCode number into the specified persist variable before launching the MCode program in KFLOP.  But I think all we need is to get the MCode down to KFLOP.  If you Specify the "Action" as "Execute" but leave the name blank it will still download the MCode but not launch any KFLOP Program.
 
Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
 
So in summary:
 
Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
 
Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
 
Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
 
Regarding your earlier question: All the UserData Vars are available for user use.  But you must coordinate all the User programs in your system to not collide.
 
For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
 
Hope this helps.
 
TK
 

Group: DynoMotion Message: 2190 From: himykabibble Date: 11/11/2011
Subject: Re: Step Pulleys and Spindle Speed
Tom,

That helps a lot. I've got the pulleys and pwm all working properly now. Thanks!

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
>  
> Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
>  
> In this case you actually don't need any M code program at all.  Normally KMotionCNC itself puts the MCode number into the specified persist variable before launching the MCode program in KFLOP.  But I think all we need is to get the MCode down to KFLOP.  If you Specify the "Action" as "Execute" but leave the name blank it will still download the MCode but not launch any KFLOP Program.
>  
> Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
>  
> So in summary:
>  
> Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
>  
> Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
>  
> Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
>  
> Regarding your earlier question: All the UserData Vars are available for user use.  But you must coordinate all the User programs in your system to not collide.
>  
> For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
>  
> Hope this helps.
>  
> TK
>  
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 11, 2011 5:48 PM
> Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
>
>
>  
> Tom,
>
> So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> >  
> > Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> >  
> > (CMD,SetPersistDec99 3)
> >  
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, November 11, 2011 6:46 AM
> > Subject: [DynoMotion] Step Pulleys and Spindle Speed
> >
> >
> >  
> > I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
> >
> > Regards,
> > Ray L.
> >
>
Group: DynoMotion Message: 2191 From: himykabibble Date: 11/11/2011
Subject: Re: Step Pulleys and Spindle Speed
Tom,

Small problem.... I had a small program for the M-codes, and all was working well. I took your suggestion, and deleted the name of the program from the M-code definitions, but it is STILL being run??? I even deleted the source file, and the .out file, and it's still being run? How do I "kill" it?

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
>  
> Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
>  
> In this case you actually don't need any M code program at all.  Normally KMotionCNC itself puts the MCode number into the specified persist variable before launching the MCode program in KFLOP.  But I think all we need is to get the MCode down to KFLOP.  If you Specify the "Action" as "Execute" but leave the name blank it will still download the MCode but not launch any KFLOP Program.
>  
> Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
>  
> So in summary:
>  
> Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
>  
> Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
>  
> Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
>  
> Regarding your earlier question: All the UserData Vars are available for user use.  But you must coordinate all the User programs in your system to not collide.
>  
> For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
>  
> Hope this helps.
>  
> TK
>  
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 11, 2011 5:48 PM
> Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
>
>
>  
> Tom,
>
> So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> >  
> > Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> >  
> > (CMD,SetPersistDec99 3)
> >  
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, November 11, 2011 6:46 AM
> > Subject: [DynoMotion] Step Pulleys and Spindle Speed
> >
> >
> >  
> > I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
> >
> > Regards,
> > Ray L.
> >
>
Group: DynoMotion Message: 2192 From: himykabibble Date: 11/11/2011
Subject: Re: Step Pulleys and Spindle Speed
Never mind - I got it.

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Tom,
>
> Small problem.... I had a small program for the M-codes, and all was working well. I took your suggestion, and deleted the name of the program from the M-code definitions, but it is STILL being run??? I even deleted the source file, and the .out file, and it's still being run? How do I "kill" it?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> >  
> > Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
> >  
> > In this case you actually don't need any M code program at all.  Normally KMotionCNC itself puts the MCode number into the specified persist variable before launching the MCode program in KFLOP.  But I think all we need is to get the MCode down to KFLOP.  If you Specify the "Action" as "Execute" but leave the name blank it will still download the MCode but not launch any KFLOP Program.
> >  
> > Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
> >  
> > So in summary:
> >  
> > Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
> >  
> > Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
> >  
> > Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
> >  
> > Regarding your earlier question: All the UserData Vars are available for user use.  But you must coordinate all the User programs in your system to not collide.
> >  
> > For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
> >  
> > Hope this helps.
> >  
> > TK
> >  
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, November 11, 2011 5:48 PM
> > Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
> >
> >
> >  
> > Tom,
> >
> > So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > >  
> > > Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> > >  
> > > (CMD,SetPersistDec99 3)
> > >  
> > > Regards
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, November 11, 2011 6:46 AM
> > > Subject: [DynoMotion] Step Pulleys and Spindle Speed
> > >
> > >
> > >  
> > > I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
> > >
> > > Regards,
> > > Ray L.
> > >
> >
>
Group: DynoMotion Message: 2193 From: Tom Kerekes Date: 11/11/2011
Subject: Re: Step Pulleys and Spindle Speed
Hi Ray,
 
Actually that does appear to be an issue/feature/bug.  If no name is specified then the Thread is still commanded to execute.  The original idea being that it would be faster if you know the program has already been compiled and downloaded (or Flashed) so the intention is just to execute.   However there is a safety mechanism in KFLOP where the execute command will be ignored if a program was never downloaded since power up or Flashed into memory .  So there would be a problem if you ever re-use that thread for something else or experiment using that thread for something else.
 
So in summary: it is probably better to specify a "Null" program with an empty main() for those MCodes.
 
Regards
TK 

Group: DynoMotion Message: 2194 From: himykabibble Date: 11/11/2011
Subject: Re: Step Pulleys and Spindle Speed
Tom,

OK. Is Persist.UserData initialized to some known value on power-up? Is there a way to save data across power cycles? I'd like to preserve the pulley selection through a power cycle if possible.

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
>  
> Actually that does appear to be an issue/feature/bug.  If no name is specified then the Thread is still commanded to execute.  The original idea being that it would be faster if you know the program has already been compiled and downloaded (or Flashed) so the intention is just to execute.   However there is a safety mechanism in KFLOP where the execute command will be ignored if a program was never downloaded since power up or Flashed into memory .  So there would be a problem if you ever re-use that thread for something else or experiment using that thread for something else.
>  
> So in summary: it is probably better to specify a "Null" program with an empty main() for those MCodes.
>  
> Regards
> TK 
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 11, 2011 7:20 PM
> Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
>
>
>  
> Never mind - I got it.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > Small problem.... I had a small program for the M-codes, and all was working well. I took your suggestion, and deleted the name of the program from the M-code definitions, but it is STILL being run??? I even deleted the source file, and the .out file, and it's still being run? How do I "kill" it?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > >  
> > > Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
> > >  
> > > In this case you actually don't need any M code program at all.  Normally KMotionCNC itself puts the MCode number into the specified persist variable before launching the MCode program in KFLOP.  But I think all we need is to get the MCode down to KFLOP.  If you Specify the "Action" as "Execute" but leave the name blank it will still download the MCode but not launch any KFLOP Program.
> > >  
> > > Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
> > >  
> > > So in summary:
> > >  
> > > Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
> > >  
> > > Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
> > >  
> > > Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
> > >  
> > > Regarding your earlier question: All the UserData Vars are available for user use.  But you must coordinate all the User programs in your system to not collide.
> > >  
> > > For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
> > >  
> > > Hope this helps.
> > >  
> > > TK
> > >  
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, November 11, 2011 5:48 PM
> > > Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
> > >
> > >
> > >  
> > > Tom,
> > >
> > > So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > >  
> > > > Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> > > >  
> > > > (CMD,SetPersistDec99 3)
> > > >  
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, November 11, 2011 6:46 AM
> > > > Subject: [DynoMotion] Step Pulleys and Spindle Speed
> > > >
> > > >
> > > >  
> > > > I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>
Group: DynoMotion Message: 2195 From: Tom Kerekes Date: 11/11/2011
Subject: Re: Step Pulleys and Spindle Speed
Hi Ray,
 
The persist.UserData is cleared on power up (unless the User Memory is Flashed - which we don't recommend unless you are running stand alone without a PC).
 
We don't currently have a mechanism for non-volatile data.
 
Regards
TK
 

Group: DynoMotion Message: 2196 From: himykabibble Date: 11/12/2011
Subject: Re: Step Pulleys and Spindle Speed
This is pretty cool! I hooked it up to the machine using my laptop this afternoon, and everything pretty much worked on the first try with both KMotionCNC and Mach3 - spindle controls (CW/CCW & PWM), coolant controls, all axes, and tool length comp using the knee all work perfectly. Next step is moving all the software onto the machines PC, and getting the pendant and probing working, both of which should be pretty simple at this point.

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
>  
> The persist.UserData is cleared on power up (unless the User Memory is Flashed - which we don't recommend unless you are running stand alone without a PC).
>  
> We don't currently have a mechanism for non-volatile data.
>  
> Regards
> TK
>  
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, November 11, 2011 7:52 PM
> Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
>
>
>  
> Tom,
>
> OK. Is Persist.UserData initialized to some known value on power-up? Is there a way to save data across power cycles? I'd like to preserve the pulley selection through a power cycle if possible.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> >  
> > Actually that does appear to be an issue/feature/bug.  If no name is specified then the Thread is still commanded to execute.  The original idea being that it would be faster if you know the program has already been compiled and downloaded (or Flashed) so the intention is just to execute.   However there is a safety mechanism in KFLOP where the execute command will be ignored if a program was never downloaded since power up or Flashed into memory .  So there would be a problem if you ever re-use that thread for something else or experiment using that thread for something else.
> >  
> > So in summary: it is probably better to specify a "Null" program with an empty main() for those MCodes.
> >  
> > Regards
> > TK 
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, November 11, 2011 7:20 PM
> > Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
> >
> >
> >  
> > Never mind - I got it.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > Small problem.... I had a small program for the M-codes, and all was working well. I took your suggestion, and deleted the name of the program from the M-code definitions, but it is STILL being run??? I even deleted the source file, and the .out file, and it's still being run? How do I "kill" it?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > >  
> > > > Let's assume you will use M codes M101 through M108 to set which Pulley is in use.
> > > >  
> > > > In this case you actually don't need any M code program at all.  Normally KMotionCNC itself puts the MCode number into the specified persist variable before launching the MCode program in KFLOP.  But I think all we need is to get the MCode down to KFLOP.  If you Specify the "Action" as "Execute" but leave the name blank it will still download the MCode but not launch any KFLOP Program.
> > > >  
> > > > Let's say we decide to use KFLOP persist.UserData variable 10 to inform KFLOP of the pulley configuration
> > > >  
> > > > So in summary:
> > > >  
> > > > Configure MCodes M101 through M108 all as "Execute", Thread=1, Var=10, Name empty
> > > >  
> > > > Then your Spindle.c program can inspect persist.UserData[10] as a number 101 through 108 to know what the pulley configuration is and do the appropriate calcs.
> > > >  
> > > > Note: take care that no other MCode or UserButon such as M3 for example or anything else uses Var=10 or the last pulley number will be inadvertently over written.
> > > >  
> > > > Regarding your earlier question: All the UserData Vars are available for user use.  But you must coordinate all the User programs in your system to not collide.
> > > >  
> > > > For diagnostics you can enter GetGatherHex10 on the Console to display the last Pulley number.
> > > >  
> > > > Hope this helps.
> > > >  
> > > > TK
> > > >  
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, November 11, 2011 5:48 PM
> > > > Subject: [DynoMotion] Re: Step Pulleys and Spindle Speed
> > > >
> > > >
> > > >  
> > > > Tom,
> > > >
> > > > So.... If I've got this right - use 8 m-codes to specify the current pulley, the m-code program would store that in a persist var, where it could be accessed by the spindle speed control program to control the PWM?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray,
> > > > > ÃÆ'‚ 
> > > > > Besides using 8 MCodes to specify the 8 speed ranges the only way I can think of currently to specify the current speed range to KFLOP is by embedding a Console Command in your GCode. You can issue KFLOP Console Commands in GCode using a special form of GCode Comment. Console commands exist that will set KFLOP Persist variables. So for example to set Speed Range 3 we might set a value of 3 into Persist Variable 99 by:
> > > > > ÃÆ'‚ 
> > > > > (CMD,SetPersistDec99 3)
> > > > > ÃÆ'‚ 
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Friday, November 11, 2011 6:46 AM
> > > > > Subject: [DynoMotion] Step Pulleys and Spindle Speed
> > > > >
> > > > >
> > > > > ÃÆ'‚ 
> > > > > I have a knee mill with step pulleys, a two-speed motor and a VFD. Pulleys, and motor speed, obviously must be changed manually. So, in effect, I have 8 different spindle speed ranges. My custom G-code post processor goes to great pains to select which pulley and motor speeds to use for each tool and operation, to minimize first the number step pulley changes, and second the number of motor speed changes. Mach3 provides a mechanism for specifying which pulley is currently in use, and it scales the S-words values appropriately when generating the spindle speed output, whether by PWM or Step/Dir, and I use a custom M-code to inform Mach3 which of 8 "pulleys" is active. But KMotionCNC appears to have no corresponding mechanism, so I'm wondering what is the best way to handle this. Any suggestions?
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > >
> > >
> >
>